package com.g8.pethospitallearnbackend.utils;

public class NewIdGenerateUtil {
    /**
     * 随机生成字符，只有数字
     * @param length  id长度
     */
    public static String getNumber(Integer length) {
        String uid = "";
        for (Integer i = 0; i < length; i++) {
            String randChar = String.valueOf(Math.round(Math.random() * 9));
            uid = uid.concat(randChar);
        }
        return uid;
    }
}
